package com.shop.shopmall.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.shopmall.pojo.Menu;
import com.shop.shopmall.pojo.Role;
import com.shop.shopmall.service.RoleService;
import com.shop.shopmall.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author jamie
* @description 针对表【role】的数据库操作Service实现
* @createDate 2025-03-20 11:52:28
*/
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role>
    implements RoleService{

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getAllRoles() {
        return roleMapper.getAllRoles();
    }

    @Override
    public List<Role> getRole(Role role, Integer pageSize, Integer pageNum) {
        return roleMapper.getRole(role, pageSize, pageNum);
    }

    @Override
    public Integer[] getMenuByRoleId(int id) {
        return roleMapper.getMenuByRoleId(id);
    }

}




